<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tennisModel.Model</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tennisScore-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >tennisScore</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tennisModel-module.html">Module&nbsp;tennisModel</a> ::
        Class&nbsp;Model
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tennisModel.Model-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Model</h1><p class="nomargin-top"><span class="codelink"><a href="tennisModel-pysrc.html#Model">source&nbsp;code</a></span></p>
<p>Provides fields and logic for a tennnis match.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#setNoEndingTiebreak" class="summary-sig-name">setNoEndingTiebreak</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">bool</span>)</span><br />
      Establishes whether final set can end with a tiebreak.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.setNoEndingTiebreak">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#setDoublesMatch" class="summary-sig-name">setDoublesMatch</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">bool</span>)</span><br />
      Establishes whether this is a doubles or singles match.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.setDoublesMatch">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#setMensMatch" class="summary-sig-name">setMensMatch</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">i</span>)</span><br />
      Establishes whether this is a men's match, women's, or some form of 
      doubles.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.setMensMatch">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="changeServer"></a><span class="summary-sig-name">changeServer</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Swaps the serving team / player.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.changeServer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">integer</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#gameDelta" class="summary-sig-name">gameDelta</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the absolute value of the difference in the current game 
      score.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.gameDelta">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#gamePoint" class="summary-sig-name">gamePoint</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">score</span>)</span><br />
      Returns whether the current score corresponds to game point.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.gamePoint">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#breakPoint" class="summary-sig-name">breakPoint</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">score</span>)</span><br />
      Returns whether the current score corresponds to break point.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.breakPoint">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#setPoint" class="summary-sig-name">setPoint</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">score</span>)</span><br />
      Returns whether the current score corresponds to set point.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.setPoint">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#matchPoint" class="summary-sig-name">matchPoint</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">score</span>)</span><br />
      Returns whether the current score corresponds to match point.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.matchPoint">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#messageCheck" class="summary-sig-name">messageCheck</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">score</span>)</span><br />
      Determines what message should be displayed on scoreboard based on 
      match conditions.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.messageCheck">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#matchOrChampionship" class="summary-sig-name">matchOrChampionship</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns whether this is a regular match or a championship.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.matchOrChampionship">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#incrementGameScore" class="summary-sig-name">incrementGameScore</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">team</span>)</span><br />
      Increments the current game score, and handles game logic (win, 
      deuce, tiebreak, and message)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementGameScore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#incrementSetScore" class="summary-sig-name">incrementSetScore</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">team</span>)</span><br />
      Increments the current set score (# of games), and handles set logic 
      (win, update match score)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementSetScore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#incrementMatchScore" class="summary-sig-name">incrementMatchScore</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">team</span>)</span><br />
      Increments the match score (# of sets), and handles match logic (win)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementMatchScore">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">string</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tennisModel.Model-class.html#singular" class="summary-sig-name">singular</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">word</span>)</span><br />
      Returns plural or singular form for word depending on singles or 
      doubles match.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tennisModel-pysrc.html#Model.singular">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="setNoEndingTiebreak"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setNoEndingTiebreak</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">bool</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.setNoEndingTiebreak">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Establishes whether final set can end with a tiebreak.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>bool</code></strong> (boolean) - Flag, True if final set can NOT end with a tiebreak.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setDoublesMatch"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setDoublesMatch</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">bool</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.setDoublesMatch">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Establishes whether this is a doubles or singles match.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>bool</code></strong> (boolean) - Flag, True if this is a doubles match.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setMensMatch"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setMensMatch</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">i</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.setMensMatch">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Establishes whether this is a men's match, women's, or some form of 
  doubles. Sets that field, also the corresponding number of sets.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>i</code></strong> (integer) - Flag, 0 = women's match, 1 = men's match, 2 = mixed doubles 
          match.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="gameDelta"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">gameDelta</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.gameDelta">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns the absolute value of the difference in the current game 
  score.</p>
  <dl class="fields">
    <dt>Returns: integer</dt>
        <dd>The absolute value of the difference in the current game score.</dd>
  </dl>
</td></tr></table>
</div>
<a name="gamePoint"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">gamePoint</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">score</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.gamePoint">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns whether the current score corresponds to game point.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>score</code></strong> (list of integers) - The current game score.</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>Whether the current score corresponds to game point.</dd>
  </dl>
</td></tr></table>
</div>
<a name="breakPoint"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">breakPoint</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">score</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.breakPoint">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns whether the current score corresponds to break point.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>score</code></strong> (list of integers) - The current game score.</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>Whether the current score corresponds to break point.</dd>
  </dl>
</td></tr></table>
</div>
<a name="setPoint"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setPoint</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">score</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.setPoint">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns whether the current score corresponds to set point.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>score</code></strong> (list of integers) - The current game score.</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>Whether the current score corresponds to set point.</dd>
  </dl>
</td></tr></table>
</div>
<a name="matchPoint"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">matchPoint</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">score</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.matchPoint">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns whether the current score corresponds to match point.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>score</code></strong> (list of integers) - The current game score.</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>Whether the current score corresponds to match point.</dd>
  </dl>
</td></tr></table>
</div>
<a name="messageCheck"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">messageCheck</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">score</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.messageCheck">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Determines what message should be displayed on scoreboard based on 
  match conditions.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>score</code></strong> (list of integers) - The current game score.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="matchOrChampionship"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">matchOrChampionship</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.matchOrChampionship">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns whether this is a regular match or a championship.</p>
  <dl class="fields">
    <dt>Returns: string</dt>
        <dd>Either 'championship' or 'match'</dd>
  </dl>
</td></tr></table>
</div>
<a name="incrementGameScore"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">incrementGameScore</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">team</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementGameScore">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Increments the current game score, and handles game logic (win, deuce,
  tiebreak, and message)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>team</code></strong> (integer) - The team that scored the point.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="incrementSetScore"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">incrementSetScore</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">team</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementSetScore">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Increments the current set score (# of games), and handles set logic 
  (win, update match score)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>team</code></strong> (integer) - The team that won the game.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="incrementMatchScore"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">incrementMatchScore</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">team</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.incrementMatchScore">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Increments the match score (# of sets), and handles match logic 
  (win)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>team</code></strong> (integer) - The team that won the set.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="singular"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">singular</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">word</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tennisModel-pysrc.html#Model.singular">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns plural or singular form for word depending on singles or 
  doubles match. Not an intelligent pluralization.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>word</code></strong> (string) - Word to be returned, singular or plural.</li>
    </ul></dd>
    <dt>Returns: string</dt>
        <dd>Plural or singular form for word depending on singles or doubles 
          match. Not an intelligent pluralization.</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tennisScore-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >tennisScore</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Nov  9 17:23:06 2014
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
